package ejb;

import details.AddressDetails;
import details.GPDetails;
import details.PatientDetails;
import exceptions.GPNotFoundException;
import exceptions.PatientNotFoundException;
import exceptions.UsernameAlreadyExistsException;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import javax.ejb.Local;

/**
 *
 * @author jeroen
 */
@Local
public interface PatientLocal {

    public void registerPatient(String username, String password, String ssn) throws UsernameAlreadyExistsException;

    public void registerPatient(PatientDetails patientDetails) throws UsernameAlreadyExistsException;

    public PatientDetails getPatient(String username) throws PatientNotFoundException;

    public List<GPDetails> getAllGPsForPatient(String usernamePatient) throws PatientNotFoundException;

    public List<PatientDetails> getAllPatients();

    public void setPatientPassword(String username, String password) throws PatientNotFoundException;

    public void setPatientSsn(String username, String ssn) throws PatientNotFoundException;

    public void setPatientName(String username, String name) throws PatientNotFoundException;

    public void setPatientSurname(String username, String surname) throws PatientNotFoundException;

    public void setPatientBloodgroup(String username, String bloodgroup) throws PatientNotFoundException;

    public void setPatientBirthday(String username, Calendar birthday) throws PatientNotFoundException;

    public void setPatientAddress(String username, AddressDetails address) throws PatientNotFoundException;

    public void setNextConsult(String username, Date nextConsult) throws PatientNotFoundException;

    public void setLastConsult(String username, Date lastConsult) throws PatientNotFoundException;

    public void addGPToPatient(String usernamePatient, String usernameGP) throws PatientNotFoundException, GPNotFoundException;

    public void removeGPFromPatient(String usernamePatient, String usernameGP) throws PatientNotFoundException, GPNotFoundException;
}
